<template>
  <div class="app-container">
    <el-dialog title="详情" open="detailvisible" :visible.sync="detailvisible" width="1600px">
      <!-- 付款  收款 -->
      <template v-if="billType === '转账'">
        <el-row :gutter="24" align="middle">
          <el-col :span="6">
            财务人员：{{model.accountName}}
          </el-col>
          <el-col :span="6">
            单据日期：{{model.billTimeStr}}
          </el-col>
          <el-col :span="6">
            单据编号：{{model.billNo}}
          </el-col>

          <el-col :span="6">
          </el-col>
        </el-row>
        <br />
        <el-table border :data="tableData" style="width: 100%">
          <el-table-column prop="depotName" label="仓库名称" >
          </el-table-column>
          <el-table-column prop="barCode" label="条码" >
          </el-table-column>
          <el-table-column prop="name" label="名称">
          </el-table-column>
          <el-table-column prop="standard" label="规格">
          </el-table-column>
          <el-table-column prop="model" label="型号">
          </el-table-column>
          <el-table-column prop="color" width="60" label="颜色">
          </el-table-column>
          <el-table-column prop="materialOther" label="扩展信息">
          </el-table-column>
          <el-table-column prop="stock" width="60" label="库存">
          </el-table-column>
          <el-table-column prop="unit" width="60" label="单位">
          </el-table-column>
          <el-table-column prop="snList" label="序列号">
          </el-table-column>
          <el-table-column prop="batchNumber" label="批号">
          </el-table-column>
          <el-table-column prop="expirationDate" label="有效期">
          </el-table-column>
          <el-table-column prop="sku" label="多属性">
          </el-table-column>
          <el-table-column prop="operNumber" width="60" label="数量">
          </el-table-column>
          <el-table-column prop="unitPrice" width="60" label="单价">
          </el-table-column>
          <el-table-column prop="taxUnitPrice" width="80" label="含税单价">
          </el-table-column>
          <el-table-column prop="allPrice" width="60" label="金额">
          </el-table-column>
          <el-table-column prop="taxRate" width="70" label="税率(%)">
          </el-table-column>
          <el-table-column prop="taxMoney" width="70" label="税额">
          </el-table-column>
          <el-table-column prop="taxLastMoney" label="价税合计">
          </el-table-column>
          <el-table-column prop="remark" label="备注">
          </el-table-column>
        </el-table>
        <br />
        <el-row :gutter="24" align="middle">
          <el-col :span="6">
            优惠率：客户1
          </el-col>
          <el-col :span="6">
            收款优惠：2022-03-04 11:00:53
          </el-col>
          <el-col :span="6">
            优惠后金额
            ：XSCK00000000694
          </el-col>

          <el-col :span="6">
            关联订单：
          </el-col>
        </el-row>
        <br />
        <el-row :gutter="24" align="middle">
          <el-col :span="6">
            结算账户：客户1
          </el-col>
          <el-col :span="6">
            本次收款：2022-03-04 11:00:53
          </el-col>
          <el-col :span="6">
            本次欠款：XSCK00000000694
          </el-col>

          <el-col :span="6">
            业务负责人：
          </el-col>
        </el-row>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" @click="detailvisible = true">打 印（待开发）</el-button>
          <el-button @click="detailvisible = false">取消</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<script>
  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getDetailList } from "@/api/basicsystem/accounthead";
  export default {
    name: "FinancialDetail",
    data() {
      return {
        billType: '',//模板分类
        detailvisible: false,
        tableData: [],
        model: {},
      };
    },
    beforeCreate() {


    },
    created() {

    },
    methods: {
      show(data, type) {
        console.log(data)
        this.model = data
        //this.tableData=data;
        this.detailvisible = true;
        this.billType = type
        let params = {};
        params.headerId = data.id;
        this.tableData = [];
        getDetailList(params).then(response => {
          // console.log(response.data)
          this.tableData = response.data;
        });
      },
    }
  };
</script>
